package com.yifeng.repo.micro.service.server.mps;

import feign.Param;
import feign.RequestLine;
import next.fire.mps.api.UserAuthService;
import org.springframework.cloud.openfeign.FeignClient;

import java.util.Map;

@FeignClient(name = "mpsUserAuthServiceClient", url = "${yfcloud.micro.service.mps.url}", path = "/fire-mps")
public interface UserAuthServiceClient extends UserAuthService {

    @Override
    @RequestLine("POST /UserAuthService/getUrl")
    String getUrl(@Param("merchantId") String merchantId, @Param("mpAppId") String mpAppId, @Param("appRedirectUrl") String appRedirectUrl,
                  @Param("state") String state);

    @Override
    @RequestLine("POST /UserAuthService/getUrl")
    String getUrl(@Param("merchantId") String merchantId, @Param("mpAppId") String mpAppId, @Param("appRedirectUrl") String appRedirectUrl,
                  @Param("state") String state, @Param("userInfo") boolean userInfo, @Param("jsapiTicket") boolean jsapiTicket);

    @Override
    @RequestLine("POST /UserAuthService/getUrl")
    String getUrl(@Param("appId") String appId, @Param("merchantId") String merchantId, @Param("mpAppId") String mpAppId, @Param("appRedirectUrl") String appRedirectUrl,
                  @Param("state") String state, @Param("userInfo") boolean userInfo, @Param("jsapiTicket") boolean jsapiTicket);

    @Override
    @RequestLine("POST /UserAuthService/getUrl")
    String getJsapiTicketUrl(@Param("merchantId") String merchantId, @Param("mpAppId") String mpAppId, @Param("appRedirectUrl") String appRedirectUrl,
                             @Param("state") String state);

    @Override
    @RequestLine("POST /UserAuthService/getUrl")
    Map getJsapiSign(@Param("merchantId") String merchantId, @Param("mpAppId") String mpAppId, @Param("appRedirectUrl") String appRedirectUrl);

    @Override
    @RequestLine("POST /UserAuthService/getUrl")
    Map getJsapiSign(@Param("merchantId") String merchantId, @Param("mpAppId") String mpAppId, @Param("currentUrl") String currentUrl,
                     @Param("agentConfig") boolean agentConfig);

    @Override
    @RequestLine("POST /UserAuthService/getUrl")
    Map getJsapiSign(@Param("appId") String appId, @Param("merchantId") String merchantId, @Param("mpAppId") String mpAppId,
                     @Param("currentUrl") String currentUrl, @Param("agentConfig") boolean agentConfig);
}
